/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package botsim;

import com.ardor3d.math.ColorRGBA;
import com.ardor3d.math.Vector3;
import com.ardor3d.math.type.ReadOnlyColorRGBA;
import com.ardor3d.math.type.ReadOnlyVector3;
import javax.vecmath.Vector3f;

/**
 * Utility library of conversion functions between Bullet and Ardor3D.
 * @author Prasanna Velagapudi <pkv@cs.cmu.edu>
 */
public class ArdorBulletUtil {

    /**
     * Simple conversion from Bullet vector to Ardor3D vector.
     * @param vec the Bullet vector to convert
     * @return the Ardor3D vector representation
     */
    public static ReadOnlyVector3 toArdorVector3(Vector3f vec) {
        return new Vector3(vec.x, vec.y, vec.z);
    }

    /**
     * Simple conversion from Bullet vector to Ardor3D color.
     * @param vec the Bullet vector to convert
     * @return the Ardor3D color representation
     */
    public static ReadOnlyColorRGBA toArdorColorRGBA(Vector3f vec) {
        return new ColorRGBA(vec.x, vec.y, vec.z, 0.0f);
    }
}
